package sicnu.cs.ich.ich.ranking.mq;

import org.apache.rocketmq.common.message.MessageExt;

import java.lang.reflect.InvocationTargetException;
import java.nio.charset.StandardCharsets;

/**
 * @author CaiKe
 * @date 2021/12/2 16:56
 */
public class Son extends Father {

    public static void main(String[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
        var son = new Son();
        son.execute();
    }

    public void execute() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
        final MessageExt message = new MessageExt();
        message.setBody("123".getBytes(StandardCharsets.UTF_8));
        var tag = "province";

        this.consumeMsg(message, tag);
    }

    public void ich(MessageExt msg){
        System.out.println(new String(msg.getBody()));
    }

    public void province(MessageExt msg){
        System.out.println(new String(msg.getBody()));
    }

}